﻿package framework.core;

/**
 * Creation date: (2003-08-28)
 * @author: administrator
 * 系统操作，处理器关系类
 */
public class ActionHandler 
{
	public static final String TABLE_NAME = "t_frm_action_handler";
	
	public static final String CODE = "CODE";
	public static final String CLASS_NAME = "CLASS_NAME";
	public static final String AUTHOR = "AUTHOR" ;

	private String m_code;
	private String m_class_name;
	private String m_author;

public ActionHandler() 
{
	super();
}
	public static ActionHandler fetch(DBConnection con,String code) throws Exception
	{
		Conditions conditions = new Conditions();
		conditions.add(CODE,code);
		DBResult result = DBEngine.doSelect(con,"select * from "+TABLE_NAME,conditions);
		java.sql.ResultSet rs = result.getRs();
		ActionHandler action_handler = null;
		if(rs.next())
		{
			action_handler = fetch(rs);
		}
		result.clear();
		return action_handler;
	}
private static ActionHandler fetch(java.sql.ResultSet rs) throws Exception
{
	ActionHandler action_handler = new ActionHandler();
	action_handler.initObject(rs);
	return action_handler;
}
	public String getClassName()
	{
		return m_class_name;
	}
	public String getCode()
	{
		return m_code;
	}
	public String getAuthor()
	{
		return m_author ;
	}
	public void initObject(java.sql.ResultSet rs) throws Exception
	{
		m_code = rs.getString(CODE);
		m_class_name = rs.getString(CLASS_NAME);
		m_author = rs.getString(AUTHOR);
	}
}
